Integrand size = 21, antiderivative size = 100 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx=\frac {(a+4 b) \log (1-\tanh (c+d x))}{4 d}-\frac {(a-4 b) \log (1+\tanh (c+d x))}{4 d}+\frac {a \tanh (c+d x)}{2 d}+\frac {b \tanh ^2(c+d x)}{2 d}+\frac {\sinh ^2(c+d x) (b+a \tanh (c+d x))}{2 d} \]
1/4*(a+4*b)*ln(1-tanh(d*x+c))/d-1/4*(a-4*b)*ln(tanh(d*x+c)+1)/d+1/2*a*tanh (d*x+c)/d+1/2*b*tanh(d*x+c)^2/d+1/2*sinh(d*x+c)^2*(b+a*tanh(d*x+c))/d
Time = 0.11 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.69 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx=\frac {a (-c-d x)}{2 d}-\frac {b \left (4 \log (\cosh (c+d x))+\text {sech}^2(c+d x)-\sinh ^2(c+d x)\right )}{2 d}+\frac {a \sinh (2 (c+d x))}{4 d} \]
(a*(-c - d*x))/(2*d) - (b*(4*Log[Cosh[c + d*x]] + Sech[c + d*x]^2 - Sinh[c + d*x]^2))/(2*d) + (a*Sinh[2*(c + d*x)])/(4*d)
Time = 0.38 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.90, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 25, 4146, 2335, 25, 2333, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sinh ^2(c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\sin (i c+i d x)^2 \left (a+i b \tan (i c+i d x)^3\right )dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \sin (i c+i d x)^2 \left (i b \tan (i c+i d x)^3+a\right )dx\) |
\(\Big \downarrow \) 4146 |
\(\displaystyle \frac {\int \frac {\tanh ^2(c+d x) \left (b \tanh ^3(c+d x)+a\right )}{\left (1-\tanh ^2(c+d x)\right )^2}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 2335 |
\(\displaystyle \frac {\frac {1}{2} \int -\frac {\tanh (c+d x) \left (2 b \tanh ^2(c+d x)+a \tanh (c+d x)+2 b\right )}{1-\tanh ^2(c+d x)}d\tanh (c+d x)+\frac {\tanh ^2(c+d x) (a \tanh (c+d x)+b)}{2 \left (1-\tanh ^2(c+d x)\right )}}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\tanh ^2(c+d x) (a \tanh (c+d x)+b)}{2 \left (1-\tanh ^2(c+d x)\right )}-\frac {1}{2} \int \frac {\tanh (c+d x) \left (2 b \tanh ^2(c+d x)+a \tanh (c+d x)+2 b\right )}{1-\tanh ^2(c+d x)}d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 2333 |
\(\displaystyle \frac {\frac {\tanh ^2(c+d x) (a \tanh (c+d x)+b)}{2 \left (1-\tanh ^2(c+d x)\right )}-\frac {1}{2} \int \left (-a-2 b \tanh (c+d x)+\frac {a+4 b \tanh (c+d x)}{1-\tanh ^2(c+d x)}\right )d\tanh (c+d x)}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{2} \left (-a \text {arctanh}(\tanh (c+d x))+a \tanh (c+d x)+b \tanh ^2(c+d x)+2 b \log \left (1-\tanh ^2(c+d x)\right )\right )+\frac {\tanh ^2(c+d x) (a \tanh (c+d x)+b)}{2 \left (1-\tanh ^2(c+d x)\right )}}{d}\) |
((Tanh[c + d*x]^2*(b + a*Tanh[c + d*x]))/(2*(1 - Tanh[c + d*x]^2)) + (-(a* ArcTanh[Tanh[c + d*x]]) + 2*b*Log[1 - Tanh[c + d*x]^2] + a*Tanh[c + d*x] + b*Tanh[c + d*x]^2)/2)/d
3.1.51.3.1 Defintions of rubi rules used
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ ExpandIntegrand[(c*x)^m*Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]
Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[ {Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[PolynomialRemainder[Pq , a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(c*x)^m*(a + b*x^2)^(p + 1)*((a*g - b*f*x)/(2*a*b*(p + 1))), x] + Simp[c/(2*a*b*(p + 1)) Int[(c*x)^(m - 1)*(a + b*x^2)^(p + 1)*ExpandToSu m[2*a*b*(p + 1)*x*Q - a*g*m + b*f*(m + 2*p + 3)*x, x], x], x]] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && LtQ[p, -1] && GtQ[m, 0]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ )])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[c*(ff^(m + 1)/f) Subst[Int[x^m*((a + b*(ff*x)^n)^p/(c^2 + ff^2*x^2)^(m/ 2 + 1)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x ] && IntegerQ[m/2]
Time = 0.43 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.68
method | result | size |
derivativedivides | \(\frac {a \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}\right )+b \left (\frac {\sinh \left (d x +c \right )^{4}}{2 \cosh \left (d x +c \right )^{2}}-2 \ln \left (\cosh \left (d x +c \right )\right )+\tanh \left (d x +c \right )^{2}\right )}{d}\) | \(68\) |
default | \(\frac {a \left (\frac {\cosh \left (d x +c \right ) \sinh \left (d x +c \right )}{2}-\frac {d x}{2}-\frac {c}{2}\right )+b \left (\frac {\sinh \left (d x +c \right )^{4}}{2 \cosh \left (d x +c \right )^{2}}-2 \ln \left (\cosh \left (d x +c \right )\right )+\tanh \left (d x +c \right )^{2}\right )}{d}\) | \(68\) |
risch | \(-\frac {a x}{2}+2 b x +\frac {{\mathrm e}^{2 d x +2 c} a}{8 d}+\frac {{\mathrm e}^{2 d x +2 c} b}{8 d}-\frac {{\mathrm e}^{-2 d x -2 c} a}{8 d}+\frac {{\mathrm e}^{-2 d x -2 c} b}{8 d}+\frac {4 b c}{d}-\frac {2 b \,{\mathrm e}^{2 d x +2 c}}{d \left ({\mathrm e}^{2 d x +2 c}+1\right )^{2}}-\frac {2 b \ln \left ({\mathrm e}^{2 d x +2 c}+1\right )}{d}\) | \(123\) |
1/d*(a*(1/2*cosh(d*x+c)*sinh(d*x+c)-1/2*d*x-1/2*c)+b*(1/2*sinh(d*x+c)^4/co sh(d*x+c)^2-2*ln(cosh(d*x+c))+tanh(d*x+c)^2))
Leaf count of result is larger than twice the leaf count of optimal. 924 vs. \(2 (90) = 180\).
Time = 0.32 (sec) , antiderivative size = 924, normalized size of antiderivative = 9.24 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx=\text {Too large to display} \]
1/8*((a + b)*cosh(d*x + c)^8 + 8*(a + b)*cosh(d*x + c)*sinh(d*x + c)^7 + ( a + b)*sinh(d*x + c)^8 - 2*(2*(a - 4*b)*d*x - a - b)*cosh(d*x + c)^6 - 2*( 2*(a - 4*b)*d*x - 14*(a + b)*cosh(d*x + c)^2 - a - b)*sinh(d*x + c)^6 + 4* (14*(a + b)*cosh(d*x + c)^3 - 3*(2*(a - 4*b)*d*x - a - b)*cosh(d*x + c))*s inh(d*x + c)^5 - 2*(4*(a - 4*b)*d*x + 7*b)*cosh(d*x + c)^4 + 2*(35*(a + b) *cosh(d*x + c)^4 - 4*(a - 4*b)*d*x - 15*(2*(a - 4*b)*d*x - a - b)*cosh(d*x + c)^2 - 7*b)*sinh(d*x + c)^4 + 8*(7*(a + b)*cosh(d*x + c)^5 - 5*(2*(a - 4*b)*d*x - a - b)*cosh(d*x + c)^3 - (4*(a - 4*b)*d*x + 7*b)*cosh(d*x + c)) *sinh(d*x + c)^3 - 2*(2*(a - 4*b)*d*x + a - b)*cosh(d*x + c)^2 + 2*(14*(a + b)*cosh(d*x + c)^6 - 15*(2*(a - 4*b)*d*x - a - b)*cosh(d*x + c)^4 - 2*(a - 4*b)*d*x - 6*(4*(a - 4*b)*d*x + 7*b)*cosh(d*x + c)^2 - a + b)*sinh(d*x + c)^2 - 16*(b*cosh(d*x + c)^6 + 6*b*cosh(d*x + c)*sinh(d*x + c)^5 + b*sin h(d*x + c)^6 + 2*b*cosh(d*x + c)^4 + (15*b*cosh(d*x + c)^2 + 2*b)*sinh(d*x + c)^4 + 4*(5*b*cosh(d*x + c)^3 + 2*b*cosh(d*x + c))*sinh(d*x + c)^3 + b* cosh(d*x + c)^2 + (15*b*cosh(d*x + c)^4 + 12*b*cosh(d*x + c)^2 + b)*sinh(d *x + c)^2 + 2*(3*b*cosh(d*x + c)^5 + 4*b*cosh(d*x + c)^3 + b*cosh(d*x + c) )*sinh(d*x + c))*log(2*cosh(d*x + c)/(cosh(d*x + c) - sinh(d*x + c))) + 4* (2*(a + b)*cosh(d*x + c)^7 - 3*(2*(a - 4*b)*d*x - a - b)*cosh(d*x + c)^5 - 2*(4*(a - 4*b)*d*x + 7*b)*cosh(d*x + c)^3 - (2*(a - 4*b)*d*x + a - b)*cos h(d*x + c))*sinh(d*x + c) - a + b)/(d*cosh(d*x + c)^6 + 6*d*cosh(d*x + ...
\[ \int \sinh ^2(c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx=\int \left (a + b \tanh ^{3}{\left (c + d x \right )}\right ) \sinh ^{2}{\left (c + d x \right )}\, dx \]
Time = 0.28 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.41 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx=-\frac {1}{8} \, a {\left (4 \, x - \frac {e^{\left (2 \, d x + 2 \, c\right )}}{d} + \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{d}\right )} - \frac {1}{8} \, b {\left (\frac {16 \, {\left (d x + c\right )}}{d} - \frac {e^{\left (-2 \, d x - 2 \, c\right )}}{d} + \frac {16 \, \log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{d} - \frac {2 \, e^{\left (-2 \, d x - 2 \, c\right )} - 15 \, e^{\left (-4 \, d x - 4 \, c\right )} + 1}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} + 2 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )}\right )}}\right )} \]
-1/8*a*(4*x - e^(2*d*x + 2*c)/d + e^(-2*d*x - 2*c)/d) - 1/8*b*(16*(d*x + c )/d - e^(-2*d*x - 2*c)/d + 16*log(e^(-2*d*x - 2*c) + 1)/d - (2*e^(-2*d*x - 2*c) - 15*e^(-4*d*x - 4*c) + 1)/(d*(e^(-2*d*x - 2*c) + 2*e^(-4*d*x - 4*c) + e^(-6*d*x - 6*c))))
Time = 0.32 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.40 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx=-\frac {4 \, {\left (d x + c\right )} {\left (a - 4 \, b\right )} - a e^{\left (2 \, d x + 2 \, c\right )} - b e^{\left (2 \, d x + 2 \, c\right )} - {\left (2 \, a e^{\left (2 \, d x + 2 \, c\right )} - 8 \, b e^{\left (2 \, d x + 2 \, c\right )} - a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + 16 \, b \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right ) - \frac {8 \, {\left (3 \, b e^{\left (4 \, d x + 4 \, c\right )} + 4 \, b e^{\left (2 \, d x + 2 \, c\right )} + 3 \, b\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{2}}}{8 \, d} \]
-1/8*(4*(d*x + c)*(a - 4*b) - a*e^(2*d*x + 2*c) - b*e^(2*d*x + 2*c) - (2*a *e^(2*d*x + 2*c) - 8*b*e^(2*d*x + 2*c) - a + b)*e^(-2*d*x - 2*c) + 16*b*lo g(e^(2*d*x + 2*c) + 1) - 8*(3*b*e^(4*d*x + 4*c) + 4*b*e^(2*d*x + 2*c) + 3* b)/(e^(2*d*x + 2*c) + 1)^2)/d
Time = 2.01 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.15 \[ \int \sinh ^2(c+d x) \left (a+b \tanh ^3(c+d x)\right ) \, dx=\frac {{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (a+b\right )}{8\,d}-\frac {2\,b}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-x\,\left (\frac {a}{2}-2\,b\right )+\frac {2\,b}{d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )}-\frac {{\mathrm {e}}^{-2\,c-2\,d\,x}\,\left (a-b\right )}{8\,d}-\frac {2\,b\,\ln \left ({\mathrm {e}}^{2\,c}\,{\mathrm {e}}^{2\,d\,x}+1\right )}{d} \]